﻿#region Copyright Info

// 
// Majesty of Omega - The next evolution of macro management space strategy
// 
// Copyright 2007-2009 André Claaßen
// 
// This file is protected by the terms and conditions of the
// Microsoft Community License (Ms-CL 1.1), a copy of which should
// have been distributed along with this software. If not,
// you may find the license information at the following URL:
// 
// http://www.microsoft.com/resources/sharedsource/licensingbasics/communitylicense.mspx

#endregion

#region

using Majesty_of_Omega.Config;

#endregion

namespace Test.Majesty_of_Omega.TestUtils
{
    /// <summary>
    /// Helper class for easy access of various configurations
    /// </summary>
    internal static class ConfigHelper
    {
        /// <summary>
        /// Gets the configuration object for the configuration name
        /// </summary>
        /// <param name="configuration">Name of the galaxy configuration, eg. 2 - Arms Galaxy. See GalaxyConfiguration.xml</param>
        /// <returns>GalaxyConfigurationsGalaxy Object</returns>
        public static GalaxyConfigurationsGalaxy GetGalaxyConfiguration(string configuration)
        {
            if (string.IsNullOrEmpty(configuration))
                configuration = "2 - Arms Galaxy";
            GalaxyConfigurations configGalaxy =
                (GalaxyConfigurations) SpreadSheetManager.ReadSpreadsheet(SpreadSheetType.GalaxyConfigurations);
            return configGalaxy.GetConfigurationByName(configuration);
        }
    }
}